package util;

public class province {
    public static int jude(String destination,String endadress,String product_type){

        if("顺丰标快".equals(product_type)){
            if ("上海".equals(destination) || "江苏".equals(destination) || "浙江".equals(destination))return 11;
            if ("安徽".equals(destination)) return 12;
            if ("北京".equals(destination) || "天津".equals(destination) || "湖北".equals(destination) || "陕西".equals(destination)
                    ||"河北".equals(destination) || "山西".equals(destination)|| "河南".equals(destination) || "山东".equals(destination)
                    || "江西".equals(destination) ||"湖南".equals(destination) ) return 13;
            if ("贵州".equals(destination) || "云南".equals(destination)  || "福建".equals(destination)
                    || "广西".equals(destination) ||"海南".equals(destination) ||"甘肃".equals(destination) || "宁夏回族".equals(destination)
                    || "宁夏".equals(destination)) return 14;
            if ("青海".equals(destination))
            {
                if( "玉树藏族".equals(endadress))
                    return 15;
                else return 14;
            }
            if ("广东".equals(destination) ||"吉林".equals(destination) || "黑龙江".equals(destination)) return 16;
            if ("内蒙古".equals(destination) ){
                if ("呼伦贝尔市".equals(endadress) || "兴安盟".equals(endadress)) return 16;
                else return 14;
            }
            if ("新疆维吾尔".equals(destination) || "新疆".equals(destination))return 17;
            if ("西藏".equals(destination)){
                if ("拉萨".equals(endadress) || "日喀则".equals(endadress) || "那曲".equals(endadress) || "山南".equals(endadress) || "林芝".equals(endadress)) {
                    return 6;
                }
                if ("成都/资阳/眉山".equals(endadress)) return 7;
            }
        }else {
            if ("上海".equals(destination) || "安徽".equals(destination) || "江苏".equals(destination) ||
                    "浙江".equals(destination) ){
                return 1;
            }
            else if("北京".equals(destination) || "福建".equals(destination) || "广东".equals(destination) ||
                    "河北".equals(destination) || "河南".equals(destination) || "湖北".equals(destination)||
                    "湖南".equals(destination) || "江西".equals(destination) || "山东".equals(destination) ||
                    "天津".equals(destination)){
                return 2;
            }
            else if ("甘肃".equals(destination) || "广西壮族".equals(destination) ||"贵州".equals(destination) ||
                    "海南".equals(destination) || "辽宁".equals(destination) || "宁夏回族".equals(destination) ||
                    "山西".equals(destination) || "陕西".equals(destination) || "四川".equals(destination) ||
                    "重庆".equals(destination) || "广西".equals(destination) || "宁夏".equals(destination)){
                return 3;
            }
            else if ("黑龙江".equals(destination) || "吉林".equals(destination) ||"内蒙古".equals(destination) || "云南".equals(destination) ){
                return 4;
            }
            else if("新疆维吾尔".equals(destination) || "新疆".equals(destination)) { return 5;}
            else if ("西藏".equals(destination)){
                if ("拉萨".equals(endadress) || "日喀则".equals(endadress) || "那曲".equals(endadress) || "山南".equals(endadress) || "林芝".equals(endadress)) {
                    return 6;
                }
                if ("成都/资阳/眉山".equals(endadress)) return 7;
            }
            else if ("青海".equals(destination)){
                if( "玉树藏族".equals(endadress))
                    return 8;
                else return 4;
            }
            else {
//            System.out.println("火星地址?"+ destination + endadress);
                return 0;
            }
        }
        return 0;
    }
}
